home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / su.z / su
Encoding:
Text File  |  2001-04-17  |  8.5 KB  |  199 lines

  1.  
  2.  
  3.  
  4. ssssuuuu((((1111MMMM))))                                                                  ssssuuuu((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      su - become superuser or another user
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ssssuuuu [ ---- ] [ name ] [ ----MMMM label ] [ ----CCCC capability set ] [ arg ... ]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _s_u allows you to become another user without logging off.  The default
  16.      user _n_a_m_e is rrrrooooooootttt (that is, superuser).
  17.  
  18.      To use _s_u, you must supply the appropriate password (except as described
  19.      below).  If the password is correct, _s_u executes a new shell with the
  20.      real and effective user ID set to that of the specified user.  The new
  21.      shell is the program optionally named in the shell field of the specified
  22.      user's password file entry (see _p_a_s_s_w_d(4)), or /_b_i_n/_s_h if none is
  23.      specified (see _s_h(1)).  To restore normal user ID privileges, type an EOF
  24.      (<(Ctrl-d>) to the new shell.
  25.  
  26.      _s_u prompts for a password if the specified user's account has one.
  27.      However, _s_u does not prompt you if your user name is rrrrooooooootttt or your name is
  28.      listed in the specified user's ._r_h_o_s_t_s file as:
  29.  
  30.           localhost _y_o_u_r__n_a_m_e
  31.  
  32.      (The hostname of llllooooccccaaaallllhhhhoooosssstttt is shorthand for the machine's name.)
  33.  
  34. OOOOPPPPTTTTIIIIOOOONNNNSSSS
  35.      ----CCCC <<<<ccccaaaappppaaaabbbbiiiilllliiiittttyyyy sssseeeetttt>>>>
  36.           Execute the requested command with the specified _c_a_p_a_b_i_l_i_t_y _s_e_t .
  37.           The requested user must be cleared to operate with the requested
  38.           capability set. If capabilities are not configured on your system,
  39.           this option is silently ignored.
  40.  
  41.      ----MMMM <<<<MMMMAAAACCCC llllaaaabbbbeeeellll>>>>
  42.           Execute the requested command at the specified _l_a_b_e_l . The invoker
  43.           of _s_u must be cleared to operate at the requested label. If that
  44.           label is different than the user's current label then stdin, stdout,
  45.           and stderr will be closed and the shell will be terminated. To
  46.           prevent shells from terminating, a new window shell must be created
  47.           at the new label. This is achieved by using the -c option (see
  48.           examples). If MAC is not configured on your system (see sysconf(1)),
  49.           this option is silently ignored.
  50.  
  51.      Any additional arguments given on the command line are passed to the
  52.      program invoked as the shell.  When using programs like _s_h(1), an _a_r_g of
  53.      the form ----cccc _s_t_r_i_n_g executes _s_t_r_i_n_g via the shell and an arg of ----rrrr gives
  54.      the user a restricted shell.
  55.  
  56.      _s_u reads /_e_t_c/_d_e_f_a_u_l_t/_s_u to determine default behavior.  To change the
  57.      defaults, the system administrator should edit this file.  Recognized
  58.      values are:
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ssssuuuu((((1111MMMM))))                                                                  ssssuuuu((((1111MMMM))))
  71.  
  72.  
  73.  
  74.           SULOG=_f_i_l_e     # Use _f_i_l_e as the su log file.
  75.           CONSOLE=_d_e_v_i_c_e # Log successful attempts to su root to _d_e_v_i_c_e.
  76.           SUPATH=_p_a_t_h    # Use _p_a_t_h as the PATH for root.
  77.           PATH=_p_a_t_h      # Use _p_a_t_h as the PATH for normal users.
  78.           SYSLOG=FAIL    # Log to syslog all failures (SYSLOG=FAIL)
  79.                          # or all successes and failures (SYSLOG=ALL).
  80.  
  81.      The following statements are true only if the optional program named in
  82.      the shell field of the specified user's password file entry is like
  83.      _s_h(1).  If the first argument to _s_u is a ----, the environment is changed to
  84.      what would be expected if the user actually logged in as the specified
  85.      user.  This is done by invoking the program used as the shell with an
  86.      _a_r_g_0 value whose first character is ----, thus causing the system's profile
  87.      (/_e_t_c/_p_r_o_f_i_l_e) and then the specified user's profile (._p_r_o_f_i_l_e in the new
  88.      HOME directory) to be executed.
  89.  
  90.      Otherwise, the environment is passed along with the possible exception of
  91.      $$$$PPPPAAAATTTTHHHH, which is set to
  92.  
  93.           /usr/sbin:/usr/bsd:/sbin:/usr/bin:/bin:/etc:/usr/etc:/usr/bin/X11
  94.  
  95.      for rrrrooooooootttt.  Additionally, environment variables of the form of those that
  96.      are special to _r_l_d(1) are not passed to the user's program; that is,
  97.      variable names beginning with either ____RRRRLLLLDDDD or LLLLDDDD____LLLLIIIIBBBBRRRRAAAARRRRYYYY.  Note that if
  98.      the optional program used as the shell is /_b_i_n/_s_h, the user's ._p_r_o_f_i_l_e
  99.      can check _a_r_g_0 for ----sssshhhh or ----ssssuuuu to determine if it was invoked by _l_o_g_i_n(1)
  100.      or _s_u, respectively.  If the user's program is other than /_b_i_n/_s_h, then
  101.      ._p_r_o_f_i_l_e is invoked with an _a_r_g_0 of ----_p_r_o_g_r_a_m by both _l_o_g_i_n and _s_u.
  102.  
  103.      All attempts to become another user using _s_u are logged in the log file
  104.      /_v_a_r/_a_d_m/_s_u_l_o_g by default.
  105.  
  106. SSSSHHHHAAAARRRREEEE IIIIIIII AAAACCCCTTTTIIIIOOOONNNNSSSS
  107.      If _s_u is invoked with the ---- option, and the Share II system is installed
  108.      and enabled, then the new shell executed by _s_u is attached to the lnode
  109.      of the specified user.
  110.  
  111.      If the specified user is not rrrrooooooootttt, the lnode attachment may fail due to a
  112.      non-existent lnode or reaching a memory or process limit, in which case
  113.      an error message is printed and _s_u fails.
  114.  
  115. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  116.      To become user bbbbiiiinnnn while retaining your previously exported environment,
  117.      execute:
  118.  
  119.           _ssss_uuuu _bbbb_iiii_nnnn
  120.  
  121.      To become user bbbbiiiinnnn but change the environment to what would be expected
  122.      if bbbbiiiinnnn had originally logged in, execute:
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ssssuuuu((((1111MMMM))))                                                                  ssssuuuu((((1111MMMM))))
  137.  
  138.  
  139.  
  140.           _ssss_uuuu _---- _bbbb_iiii_nnnn
  141.  
  142.      To execute _c_o_m_m_a_n_d with the temporary environment and permissions of user
  143.      bbbbiiiinnnn, type:
  144.  
  145.           _ssss_uuuu _---- _bbbb_iiii_nnnn _----_cccc _""""_c_o_m_m_a_n_d _a_r_g_s_""""
  146.  
  147.      Under Trusted Irix, to create a new window shell for user bbbbiiiinnnn at a MAC
  148.      label of dblow, execute:
  149.  
  150.           _ssss_uuuu _bbbb_iiii_nnnn _----_MMMM _dddd_bbbb_llll_oooo_wwww _----_cccc _xxxx_wwww_ssss_hhhh _&&&&
  151.  
  152.  
  153. FFFFIIIILLLLEEEESSSS
  154.      /etc/passwd     system's password file
  155.      /etc/profile    system's initialization script for /_b_i_n/_s_h users
  156.      /etc/cshrc      system's initialization script for /_b_i_n/_c_s_h users
  157.      $HOME/.profile  /_b_i_n/_s_h user's initialization script
  158.      $HOME/.cshrc    /_b_i_n/_c_s_h user's initialization script
  159.      $HOME/.rhosts   user's list of trusted users
  160.      /var/adm/sulog  log file
  161.      /etc/default/su defaults file
  162.      /etc/limconf    compiled Share II configuration file (machine readable)
  163.  
  164. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  165.      capability(4), env(1), login(1), rld(1), sh(1), cshrc(4), passwd(4),
  166.      profile(4), rhosts(4), environ(5), share(5).
  167.  
  168. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  169.      su: uid _N: cannot attach to lnode - _r_e_a_s_o_n.
  170.           The lnode attachment failed, so the shell was not executed.
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.